Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Howard Fezboosimanjip 16.Jan.04 07:29 PM a Web browser
Domino Server 6.0.2 CF2 Windows 2000


I am trying to update a backend MS SQL Server via the "WebQuerySave" event of the 'form' using the following agent. I am getting the following error on the console:

"Operation is disallowed in this session"

It is breaking at

'Set cn=createobject("ADODB.Connection")'

The code is working fine if I try to run it via notes client. But it is failing via browser. What additional settings do I need for the ADODB to work via web.

*********************
Sub Initialize
Dim session As NotesSession
Dim doc As NotesDocument
Set session = New NotesSession
Set doc = session.DocumentContext
Dim Connect As Variant
Dim RecordSet As Variant
Dim Qry As String
Dim cn As Variant

Print "test 1"
Set cn=createobject("ADODB.Connection")
Print "test 1"

cn.Open "DRIVER={SQL Server};SERVER=DEV;database=Prod;UID=dev;PWD=password"
Qry = |Select * from web_stat|
Set RecordSet = CreateObject("ADODB.Recordset")
RecordSet.Open Qry,cn,2,1
RecordSet.MoveFirst
For i = 1 To 10
Print Cstr(i) & " --> " & RecordSet.Fields("file_accessed").Value
RecordSet.MoveNext
Next
RecordSet.close

strSQL = "exec file_tacker"

cn.Execute (strSQL)
cn.close
End Sub
****************






Notes Access to MS SQL Server via W... (~Howard Fezboos... 16.Jan.04)
. . Read up on Agent Security. The sign... (~Dan Elhipister... 16.Jan.04)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS